﻿<%@ Page Language="vb" AutoEventWireup="false" Title="CUPS Home" MasterPageFile="~/Content/Site.Master" CodeBehind="Default.aspx.vb" Inherits="CupsApp.Web.Form._Default" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

<div class = "Content2">
<div class = "filler"></div>

  
  <div class="FullRow1">
     <div class="filler"></div>
      <asp:CheckBox ID="chkMyClients" runat="server" Text="My Clients" 
          AutoPostBack="True" />&nbsp;&nbsp;&nbsp;
        <asp:MutuallyExclusiveCheckBoxExtender ID="chkMyClients_MutuallyExclusiveCheckBoxExtender" 
                    runat="server" Enabled="True" Key="clientsCheckbox" TargetControlID="chkMyClients">
                </asp:MutuallyExclusiveCheckBoxExtender>

      <asp:CheckBox 
          ID="chkAllClients" runat="server" Text="All Clients"  Checked="True" 
          AutoPostBack="True" />
          <asp:MutuallyExclusiveCheckBoxExtender ID="MutuallyExclusiveCheckBoxExtender1" 
                    runat="server" Enabled="True" Key="clientsCheckbox" TargetControlID="chkAllClients">
                </asp:MutuallyExclusiveCheckBoxExtender>
  </div>
<asp:FormView ID="FormView2" runat="server" DataSourceID="ObjectDataSource1" DefaultMode="Edit" Width="98%" height = "100%" CellSpacing="0" CellPadding="0" >
<EditItemTemplate>


  
  <div class="FullRow1">
     <div class="filler"></div>
     <div class="FormHeading">
         <strong><asp:Label ID="Label1" runat="server" Text="CLIENT / FAMILY LIST"></asp:Label></strong>
    </div>
  </div>
        <div class = "filler"></div><div class = "filler"></div>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataSourceID="ObjectDataSource1" AllowPaging="True" 
        AllowSorting="True" width = "900px" DataKeyNames="ID">
            <Columns>
                <asp:CommandField ShowDeleteButton="True"  DeleteText = "Disable" />
                <asp:BoundField DataField="LastName" HeaderText="LastName" 
                    SortExpression="LastName" />
                <asp:BoundField DataField="FirstName" HeaderText="FirstName" 
                    SortExpression="FirstName" />
                <asp:BoundField DataField="CurrentStatus" HeaderText="CurrentStatus" 
                    SortExpression="CurrentStatus" />
                <asp:BoundField DataField="DateStarted" HeaderText="DateStarted" 
                    SortExpression="DateStarted" />
                <asp:BoundField DataField="LastUpdateDays" HeaderText="LastUpdateDays" 
                    SortExpression="LastUpdateDays" />
                <asp:BoundField DataField="ID" HeaderText="ID" SortExpression="ID" 
                    Visible="False" />
                <asp:HyperLinkField DataNavigateUrlFields="ID" 
                    DataNavigateUrlFormatString="~/Forms/status.aspx?clientID={0}" 
                    Text="Details" />
            </Columns>
        </asp:GridView>
        <div class = "filler"></div>
</div>

</EditItemTemplate>
</asp:FormView>

    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
        SelectMethod="GetClientSummary" TypeName="CupsApp.Service.CupsDomainService" 
            EnablePaging="True" SortParameterName="sortType" 
        DeleteMethod="DisableClient">
        <DeleteParameters>
            <asp:Parameter Name="ID" Type="Int32" />
        </DeleteParameters>
        <SelectParameters>
            <asp:Parameter Name="maximumRows" Type="Int32" />
            <asp:Parameter Name="startRowIndex" Type="Int32" />
            <asp:Parameter Name="sortType" Type="String" />
            <asp:ControlParameter ControlID="chkMyClients" Name="myClientsOnly" 
                PropertyName="Checked" Type="Boolean" />
        </SelectParameters>
    </asp:ObjectDataSource>
    
        <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </asp:ToolkitScriptManager>
    </div>
</asp:Content>

